<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ListIdeaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form styleClass="jsfcrud_list_form">
                <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                </h:panelGroup>
                <h:outputText escape="false" value="#{bundle.ListIdeaEmpty}" rendered="#{ideaController.items.rowCount == 0}"/>
                <h:panelGroup rendered="#{ideaController.items.rowCount > 0}">
                    <h:outputText value="#{ideaController.pagination.pageFirstItem + 1}..#{ideaController.pagination.pageLastItem + 1}/#{ideaController.pagination.itemsCount}"/>&nbsp;
                    <h:commandLink action="#{ideaController.previous}" value="#{bundle.Previous} #{ideaController.pagination.pageSize}" rendered="#{ideaController.pagination.hasPreviousPage}"/>&nbsp;
                    <h:commandLink action="#{ideaController.next}" value="#{bundle.Next} #{ideaController.pagination.pageSize}" rendered="#{ideaController.pagination.hasNextPage}"/>&nbsp;
                    <h:dataTable value="#{ideaController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_idIdea}"/>
                            </f:facet>
                            <h:outputText value="#{item.idIdea}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_titulo}"/>
                            </f:facet>
                            <h:outputText value="#{item.titulo}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_descripcion}"/>
                            </f:facet>
                            <h:outputText value="#{item.descripcion}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_palabrasClave}"/>
                            </f:facet>
                            <h:outputText value="#{item.palabrasClave}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_justificacion}"/>
                            </f:facet>
                            <h:outputText value="#{item.justificacion}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_problema}"/>
                            </f:facet>
                            <h:outputText value="#{item.problema}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_antecedente}"/>
                            </f:facet>
                            <h:outputText value="#{item.antecedente}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_metodologia}"/>
                            </f:facet>
                            <h:outputText value="#{item.metodologia}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_resultado}"/>
                            </f:facet>
                            <h:outputText value="#{item.resultado}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_objetivoGeneral}"/>
                            </f:facet>
                            <h:outputText value="#{item.objetivoGeneral}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_version}"/>
                            </f:facet>
                            <h:outputText value="#{item.version}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_subdireccion}"/>
                            </f:facet>
                            <h:outputText value="#{item.subdireccion}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_entidad}"/>
                            </f:facet>
                            <h:outputText value="#{item.entidad}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_objetivoespecifico}"/>
                            </f:facet>
                            <h:outputText value="#{item.objetivoespecifico}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_tipoproyecto}"/>
                            </f:facet>
                            <h:outputText value="#{item.tipoproyecto}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_investigador}"/>
                            </f:facet>
                            <h:outputText value="#{item.investigador}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListIdeaTitle_areainvestigacion}"/>
                            </f:facet>
                            <h:outputText value="#{item.areainvestigacion}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="&nbsp;"/>
                            </f:facet>
                            <h:commandLink action="#{ideaController.prepareView}" value="#{bundle.ListIdeaViewLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{ideaController.prepareEdit}" value="#{bundle.ListIdeaEditLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{ideaController.destroy}" value="#{bundle.ListIdeaDestroyLink}"/>
                        </h:column>
                    </h:dataTable>
                </h:panelGroup>
                <br />
                <h:commandLink action="#{ideaController.prepareCreate}" value="#{bundle.ListIdeaCreateLink}"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.ListIdeaIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
